package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhServiceOrderLogMapper;
import com.ruoyi.zsyh.domain.ZsyhServiceOrderLog;
import com.ruoyi.zsyh.service.IZsyhServiceOrderLogService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单过程追踪Service业务层处理
 * 
 * @author yuexl
 * @date 2022-09-06
 */
@Service
public class ZsyhServiceOrderLogServiceImpl implements IZsyhServiceOrderLogService 
{
    @Autowired
    private ZsyhServiceOrderLogMapper zsyhServiceOrderLogMapper;

    /**
     * 查询订单过程追踪
     * 
     * @param id 订单过程追踪ID
     * @return 订单过程追踪
     */
    @Override
    public ZsyhServiceOrderLog selectZsyhServiceOrderLogById(String id)
    {
        return zsyhServiceOrderLogMapper.selectZsyhServiceOrderLogById(id);
    }

    /**
     * 查询订单过程追踪列表
     * 
     * @param zsyhServiceOrderLog 订单过程追踪
     * @return 订单过程追踪
     */
    @Override
    public List<ZsyhServiceOrderLog> selectZsyhServiceOrderLogList(ZsyhServiceOrderLog zsyhServiceOrderLog)
    {
        return zsyhServiceOrderLogMapper.selectZsyhServiceOrderLogList(zsyhServiceOrderLog);
    }

    /**
     * 新增订单过程追踪
     * 
     * @param zsyhServiceOrderLog 订单过程追踪
     * @return 结果
     */
    @Override
    public int insertZsyhServiceOrderLog(ZsyhServiceOrderLog zsyhServiceOrderLog)
    {
        zsyhServiceOrderLog.setId(IdWorker.getId());
        zsyhServiceOrderLog.setCreateTime(DateUtils.getNowDate());
        return zsyhServiceOrderLogMapper.insertZsyhServiceOrderLog(zsyhServiceOrderLog);
    }

    /**
     * 修改订单过程追踪
     * 
     * @param zsyhServiceOrderLog 订单过程追踪
     * @return 结果
     */
    @Override
    public int updateZsyhServiceOrderLog(ZsyhServiceOrderLog zsyhServiceOrderLog)
    {
        return zsyhServiceOrderLogMapper.updateZsyhServiceOrderLog(zsyhServiceOrderLog);
    }

    /**
     * 删除订单过程追踪对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceOrderLogByIds(String ids)
    {
        return zsyhServiceOrderLogMapper.deleteZsyhServiceOrderLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除订单过程追踪信息
     * 
     * @param id 订单过程追踪ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceOrderLogById(String id)
    {
        return zsyhServiceOrderLogMapper.deleteZsyhServiceOrderLogById(id);
    }
}
